import request from '@/utils/request'

// 查询家政人员列表
export function listLaborer(query) {
  return request({
    url: '/system/laborer/list',
    method: 'get',
    params: query
  })
}

// 查询家政人员详细
export function getLaborer(id) {
  return request({
    url: '/system/laborer/' + id,
    method: 'get'
  })
}

// 新增家政人员
export function addLaborer(data) {
  return request({
    url: '/system/laborer',
    method: 'post',
    data: data
  })
}

// 修改家政人员
export function updateLaborer(data) {
  return request({
    url: '/system/laborer',
    method: 'put',
    data: data
  })
}

// 删除家政人员
export function delLaborer(id) {
  return request({
    url: '/system/laborer/' + id,
    method: 'delete'
  })
}

// 省市区
export function getregion(id) {
  return request({
    url: '/region/item/' + id,
    method: 'get'
  })
}

// 查询手机号
export function getphone(phone) {
  return request({
    url: '/system/miniuser/getInfoByPhone/' + phone,
    method: 'get'
  })
}

// 查询手机号
export function getorder(data) {
  return request({
    url: '/system/order',
    method: 'post',
    data: data
  })
}

// 撤销服务
export function chexiaoFuWu(data) {
  return request({
    url: '/system/order/update/' + data.id,
    method: 'post',
    data: data
  })
}

// 上传获取token
export function uploadimg(data) {
  return request({
    url: '/system/miniuser/getUploadToken',
    method: 'get',
    data: data
  })
}

// 上传七牛云
export function uploadqiniu(data) {
  return request({
    url: 'https://upload-z1.qiniup.com',
    method: 'post',
    data: data
  })
}
